<template>
  <div ref="barChart" class="barChart" />
</template>

<script>
import * as echarts from 'echarts'
export default {
  mounted() {
    const barChart = echarts.init(this.$refs.barChart)
    const option = {
      xAxis: {
        show: false,
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
      },
      yAxis: {
        show: false,
        type: 'value'
      },
      grid: {
        left: 0,
        right: 0,
        bottom: 0,
        top: 0
      },
      series: [
        {
          data: [120, 200, 150, 80, 70, 110, 130],
          type: 'bar'
        }
      ]
    }
    barChart.setOption(option)
  }
}
</script>

<style scoped lang="scss">
.barChart {
  width: 100%;
  height: 100%;
}
</style>
